import 'package:flutter/material.dart';
import 'package:flutter_web/controller/menu_controller.dart';
import 'package:flutter_web/page/content_widget.dart';
import 'package:flutter_web/page/header/header-widget.dart';
import 'package:flutter_web/page/menu/slider_menu_widget.dart';
import 'package:get/get.dart';

class HomePage extends StatefulWidget {
  const HomePage({Key key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  MenuController _menuController = Get.put(MenuController());
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      key: _menuController.homeScaffoldKey,
      drawer: SliderMenuWidget(),
      backgroundColor: Colors.grey[200],
      body: SingleChildScrollView(
        child: Column(
          children: [
            HeaderWidget(),
            //第二部分的内容
            Container(
              child: ContentWidget(), //最大宽度
              constraints: BoxConstraints(maxWidth: 1000),
            ),
          ],
        ),
      ),
    );
  }
}
